<?php

namespace App\Console\Commands;

use Illuminate\Console\Command;

class AddWordCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'word:add';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'add words';

    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct()
    {
        parent::__construct();
    }

    /**
     * Execute the console command.
     *
     * @return int
     */
    public function handle()
    {
        $str = <<<EOF
above:超过、高于
additional:额外的
adjust up:调整
adjacency:临近
alleviate:减轻、缓解
architecture:架构、结构、建筑学
bandwidth:带宽
benefit:益处
congestion:拥堵、过剩
committed rate:承诺比例
combined:合并
continuous:持续
connectivity:链接
considerations:注意事项、考虑
distribute:分发
efficient:高效的
establishment:建立
exceeds:超过、过量的
capital:资金、成本、首都
edge:边缘
enterprise:企业
expenditure:支出
demand:要求
destinations:目的
fabric:架构、矩阵
fact:事实
feature:特性
fusion:融合
guarantee:保持、保证
jitter:抖动
increase:增加
infrastructure:基础设施
in order to:以便、为了
isolation:隔离
lower latency:低延迟
maintain:维持、维护
orchestration:编排
overlay network:覆盖网络
perform:执行
policies:策略、政策
provides:提供
particular:特定
physically:物理上
punts:处理？
traffic:流量、交通
two-tier:两层
responsible:负责的
related:相关的
redundancy:冗余
radio resource:无线电资源
route leaking:路由泄露
resolving:解析
resolve:解析
scale:规模
scalability:扩展性
segmentation:分隔	
solution:解决方案
supervisor:主管、管理者
tunnel:隧道
uninterrupted:不间断的
wired:有线'
EOF;
        $lines = \explode("\n", $str);
        foreach ($lines as $line) {
            list($word, $trans) = explode(':', $line);
            
            $filename = 'words/' . $word;
            \Storage::put($filename, $trans);
        }
        return Command::SUCCESS;
    }
}
